#include <iostream>
#include<string>
using namespace std;

int main()
{
    string str;
    cin >> str;
    int max = 0;
    int left = 0, right = 0;
    for (int i = 0; i < str.size(); i++)
    {
        if (str[i] > '0' && str[i] < '9')
        {
            max = right - left;
            int _left = i, _right = i;
            while (i < str.size() && (str[i] >= '0' && str[i] <= '9'))
            {
                _right++;
                i++;
            }
            if (_right - _left > max)
            {
                max = _right - _left;
                right = _right;
                left = _left;
            }
        }
    }
    if (right == 0)
        cout << "";
    else
        cout << str.substr(left, max);
    return 0;

}